App.controller('myOrderDetailController', ['$rootScope', '$scope', '$state', '$window', 'Page',function($rootScope, $scope, $state, $window, Page) {
	$scope.orderId = $state.params.orderId;
	$scope.order = {};
	
	Page.ajaxPost("app/order/details.do",{orderId : $scope.orderId},function(resp){
        $scope.order = resp.data;
        Page.ajaxPost("line/stops.do",{lineId : $scope.order.lineId},function(resp){
            $scope.stopList = resp.data;
        });
    });
	
	$scope.payNow = function(){
		$state.go('user.orderPay', {orderId : $scope.order.orderId});
	};
	
	$scope.toRefund = function(){
		$state.go('user.orderRefund', {orderId : $scope.order.orderId});
	};
	
}]);